/**
 * 项目配置
 */

// 环境配置
export const ENV = {
  DEVELOPMENT: "development",
  PRODUCTION: "production",
} as const;

// 当前环境
export const CURRENT_ENV = ENV.DEVELOPMENT;

// API配置
export const API_CONFIG = {
  [ENV.DEVELOPMENT]: {
    baseURL: "https://dev-api.xianzhi.com",
    timeout: 10000,
  },
  [ENV.PRODUCTION]: {
    baseURL: "https://api.xianzhi.com",
    timeout: 10000,
  },
};

// 分页配置
export const PAGE_CONFIG = {
  DEFAULT_PAGE_SIZE: 10,
  MAX_PAGE_SIZE: 50,
};

// 图片配置
export const IMAGE_CONFIG = {
  MAX_SIZE: 5 * 1024 * 1024, // 5MB
  MAX_COUNT: 9, // 最多9张图片
  ALLOWED_TYPES: ["jpg", "jpeg", "png", "webp"],
};

// 路由路径
export const ROUTES = {
  HOME: "/pages/index/index",
  GOODS_DETAIL: "/pages/goods/detail",
  GOODS_PUBLISH: "/pages/goods/publish",
  USER_CENTER: "/pages/user/center",
  USER_GOODS: "/pages/user/goods",
  USER_FAVORITES: "/pages/user/favorites",
  // SEARCH: '/pages/search/index'
} as const;

// 商品分类图标映射
export const CATEGORY_ICONS = {
  服装: "/static/c1.png",
  书籍: "/static/c2.png",
  数码: "/static/c3.png",
  家居: "/static/c4.png",
  运动: "/static/c5.png",
  美妆: "/static/c6.png",
  母婴: "/static/c7.png",
  其他: "/static/c8.png",
} as const;
